#ifndef Framework_H
#define Framework_H

#include <QtGui/QMainWindow>
#include <ui_framework.h>
			 
class TriMesh;

class Framework : public QMainWindow
{
	Q_OBJECT

public:
	Framework(QWidget *parent = 0, Qt::WFlags flags = 0);
	~Framework();
	TriMesh * getMesh(){return m_pModel;}
	Ui::CGFrameworkClass & getUi(){return ui;}
	void updatGL(){ui.centralWidget->updateGL();}
private:
	Ui::CGFrameworkClass ui;

protected:
	void closeEvent(QCloseEvent *event);

private slots:
	void on_actionOpen_triggered();
	void on_actionSave_triggered();
	void on_actionAbout_triggered();

//	void on_actionAbout_QT_triggered();

	void on_actionPoints_triggered();
	void on_actionTriangle_triggered();
	void on_actionEdge_triggered();
private:
	void readSettings();
	void writeSettings();

	bool loadFile(const QString &fileName);
	bool saveFile(const QString &fileName);
	void setCurrentFile(const QString &fileName);

	QString strippedName(const QString &fullFileName);

	TriMesh*     m_pModel;
	QString       m_curFile;

	//CCCST*        m_pAlgorithm;
};

#endif // Framework_H
